package com.daka.service.impl;

import com.daka.dao.ActivityAddressMapper;
import com.daka.entity.ActivityAddress;
import com.daka.service.ActivityAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by yangx
 * Date: 2016/8/5 0005
 * Time: 14:33
 */
@Service("activityAddressService")
@Transactional
public class ActivityAddressServiceImpl implements ActivityAddressService {

    @Autowired
    private ActivityAddressMapper activityAddressMapper;

    public int insert(ActivityAddress activityAddress){
        return activityAddressMapper.insert(activityAddress);
    }

    public int update(ActivityAddress activityAddress){
        return activityAddressMapper.updateByPrimaryKeySelective(activityAddress);
    }

    public ActivityAddress selectByPrimaryKey(Long id){
        return activityAddressMapper.selectByPrimaryKey(id);
    }

    public List<ActivityAddress> selectAll(){
        return activityAddressMapper.selectAll();
    }
}
